<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>${article.title} - ${site.name}</title>
    <meta name="description" content="${article.articleExt.seoDescription}">
    <meta name="keywords" content="${article.articleExt.seoKeywords}">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f8f9fa;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background: white;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .article-header {
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e9ecef;
        }

        .article-title {
            font-size: 28px;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 15px;
            line-height: 1.3;
        }

        .article-subtitle {
            font-size: 18px;
            color: #6c757d;
            margin-bottom: 20px;
        }

        .article-meta {
            display: flex;
            justify-content: center;
            gap: 20px;
            font-size: 14px;
            color: #6c757d;
            flex-wrap: wrap;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .article-image {
            text-align: center;
            margin: 30px 0;
        }

        .article-image img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .article-content {
            font-size: 16px;
            line-height: 1.8;
            margin-bottom: 30px;
        }

        .article-content h1,
        .article-content h2,
        .article-content h3,
        .article-content h4,
        .article-content h5,
        .article-content h6 {
            margin: 25px 0 15px 0;
            color: #2c3e50;
        }

        .article-content p {
            margin-bottom: 15px;
        }

        .article-content ul,
        .article-content ol {
            margin: 15px 0;
            padding-left: 30px;
        }

        .article-content li {
            margin-bottom: 8px;
        }

        .article-content blockquote {
            border-left: 4px solid #3498db;
            padding: 15px 20px;
            margin: 20px 0;
            background: #f8f9fa;
            font-style: italic;
        }

        .article-content code {
            background: #f1f3f4;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Monaco', 'Menlo', monospace;
        }

        .article-content pre {
            background: #2d3748;
            color: #e2e8f0;
            padding: 20px;
            border-radius: 8px;
            overflow-x: auto;
            margin: 20px 0;
        }

        .article-footer {
            border-top: 1px solid #e9ecef;
            padding-top: 20px;
            margin-top: 30px;
        }

        .article-tags {
            margin-bottom: 20px;
        }

        .tag {
            display: inline-block;
            background: #3498db;
            color: white;
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 12px;
            margin-right: 8px;
            margin-bottom: 8px;
            text-decoration: none;
        }

        .article-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            color: #6c757d;
        }

        .breadcrumb {
            margin-bottom: 20px;
            font-size: 14px;
        }

        .breadcrumb a {
            color: #3498db;
            text-decoration: none;
        }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .container {
                margin: 0;
                padding: 15px;
                box-shadow: none;
            }

            .article-title {
                font-size: 24px;
            }

            .article-meta {
                flex-direction: column;
                gap: 10px;
            }

            .article-stats {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 面包屑导航 -->
        <nav class="breadcrumb">
            <a href="/">首页</a> > 
            <a href="/portal/channel/${article.channelId}">${article.channel.name}</a> > 
            ${article.title}
        </nav>

        <!-- 文章头部 -->
        <header class="article-header">
            <h1 class="article-title">${article.title}</h1>
            <#if article.subtitle??>
                <p class="article-subtitle">${article.subtitle}</p>
            </#if>
            
            <div class="article-meta">
                <span class="meta-item">
                    <span>📝</span>
                    <span>作者：${article.author!'未知'}</span>
                </span>
                <span class="meta-item">
                    <span>📅</span>
                    <span>发布时间：${article.publishDate?string('yyyy-MM-dd HH:mm')}</span>
                </span>
                <span class="meta-item">
                    <span>👁️</span>
                    <span>浏览：${article.views}次</span>
                </span>
                <#if article.source??>
                    <span class="meta-item">
                        <span>📰</span>
                        <span>来源：${article.source}</span>
                    </span>
                </#if>
            </div>
        </header>

        <!-- 文章主图 -->
        <#if article.image??>
            <div class="article-image">
                <img src="${article.image}" alt="${article.title}">
            </div>
        </#if>

        <!-- 文章内容 -->
        <main class="article-content">
            ${article.articleExt.content}
        </main>

        <!-- 文章底部 -->
        <footer class="article-footer">
            <!-- 标签 -->
            <#if article.tags?? && article.tags?size > 0>
                <div class="article-tags">
                    <#list article.tags as tag>
                        <a href="/portal/tag/${tag.id}" class="tag">${tag.name}</a>
                    </#list>
                </div>
            </#if>

            <!-- 统计信息 -->
            <div class="article-stats">
                <div>
                    <span>👍 ${article.ups} 赞</span>
                    <span style="margin-left: 15px;">💬 ${article.comments} 评论</span>
                    <span style="margin-left: 15px;">⭐ ${article.favorites} 收藏</span>
                </div>
                <div>
                    最后更新：${article.updateDate?string('yyyy-MM-dd HH:mm')}
                </div>
            </div>
        </footer>
    </div>
</body>
</html>
